import json
import hashlib

def verify_shared_policy(policy_json, policy_hash):
    """
    验证共享的安全策略
    :param policy_json: 策略的JSON表示
    :param policy_hash: 预期的哈希值
    :return: 是否验证通过
    """
    calculated_hash = hashlib.sha256(policy_json.encode()).hexdigest()
    return calculated_hash == policy_hash

# 示例
policy_json = json.dumps(policy)
policy_hash = hashlib.sha256(policy_json.encode()).hexdigest()
is_verified = verify_shared_policy(policy_json, policy_hash)
print(f"Policy verified: {is_verified}")